import { createRouter, createWebHistory } from 'vue-router';

const routes = [
    {
        path: '/',
        name: 'PC',
        redirect: '/layout'
    },
    {
        path: '/layout',
        name: 'Layout',
        component: () => import("@/views/layout/index.vue"),
        redirect: '/home',
        children: [
            {
                path: '/home',
                name: 'Home',
                component: () => import("@/views/home/index.vue")
            }
        ]
    }
    // 你可以根据需要添加更多路由
];

const router = createRouter({
    history: createWebHistory(process.env.BASE_URL),
    routes
});

export default router;
